package com.czkt.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.czkt.pojo.Details;
import com.czkt.service.DetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
public class DetailsController {
    @Autowired
    DetailsService detailsService;
    @RequestMapping("/details/list")
    public Object detailsList(){
        QueryWrapper<Details> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("details_img_id", 1);
        return detailsService.list(queryWrapper);
    }
    @RequestMapping("/details/detailsListNamePriceImg")
    public Object detailsListNamePriceImg(){
        return detailsService.detailsList();
    }

}
